package com.lysj.bhp.scheduled.repository;


import com.lysj.bhp.scheduled.domain.BhpcWallet;
import com.lysj.bhp.scheduled.domain.User;
import org.springframework.data.jpa.repository.JpaRepository;

import java.math.BigDecimal;
import java.util.List;


public interface BhpcWalletRepository extends JpaRepository<BhpcWallet, Long> {

    BhpcWallet findByUserId(Long userId);

    /**
     * 查询bhcp钱包距离上次查询最久的钱包
     * @return
     */
    BhpcWallet findFirstByOrderByLastQueryTimeAsc();


//        List<User> findByBhpcGreaterThan(double bhpc);

    List<BhpcWallet> findByAvailBalanceGreaterThan(BigDecimal bhpc);

}
